<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfAdoptedSession</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch03.html" title="Libinfinity's adOPTed implementation">
<link rel="prev" href="ch03.html" title="Libinfinity's adOPTed implementation">
<link rel="next" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="InfAdoptedAlgorithm.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfAdoptedSession.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfAdoptedSession.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfAdoptedSession.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfAdoptedSession.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#InfAdoptedSession.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry" title="InfAdoptedSession">
<a name="InfAdoptedSession"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfAdoptedSession.top_of_page"></a>InfAdoptedSession</span></h2>
<p>InfAdoptedSession — Session handling concurrency control via the adOPTed
algorithm.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Stability Level">
<a name="InfAdoptedSession.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="InfAdoptedSession.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libinfinity/adopted/inf-adopted-session.h&gt;

enum                <a class="link" href="InfAdoptedSession.html#InfAdoptedSessionError" title="enum InfAdoptedSessionError">InfAdoptedSessionError</a>;
                    <a class="link" href="InfAdoptedSession.html#InfAdoptedSession-struct" title="InfAdoptedSession">InfAdoptedSession</a>;
                    <a class="link" href="InfAdoptedSession.html#InfAdoptedSessionClass" title="InfAdoptedSessionClass">InfAdoptedSessionClass</a>;
<a class="link" href="InfIo.html" title="InfIo"><span class="returnvalue">InfIo</span></a> *             <a class="link" href="InfAdoptedSession.html#inf-adopted-session-get-io" title="inf_adopted_session_get_io ()">inf_adopted_session_get_io</a>          (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>);
<a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="returnvalue">InfAdoptedAlgorithm</span></a> * <a class="link" href="InfAdoptedSession.html#inf-adopted-session-get-algorithm" title="inf_adopted_session_get_algorithm ()">inf_adopted_session_get_algorithm</a> (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfAdoptedSession.html#inf-adopted-session-broadcast-request" title="inf_adopted_session_broadcast_request ()">inf_adopted_session_broadcast_request</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a> *request</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfAdoptedSession.html#inf-adopted-session-undo" title="inf_adopted_session_undo ()">inf_adopted_session_undo</a>            (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfAdoptedSession.html#inf-adopted-session-redo" title="inf_adopted_session_redo ()">inf_adopted_session_redo</a>            (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="InfAdoptedSession.html#inf-adopted-session-read-request-info" title="inf_adopted_session_read_request_info ()">inf_adopted_session_read_request_info</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#InfAdoptedStateVector" title="InfAdoptedStateVector"><span class="type">InfAdoptedStateVector</span></a> *diff_vec</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> **user</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#InfAdoptedStateVector" title="InfAdoptedStateVector"><span class="type">InfAdoptedStateVector</span></a> **time</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> *operation</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfAdoptedSession.html#inf-adopted-session-write-request-info" title="inf_adopted_session_write_request_info ()">inf_adopted_session_write_request_info</a>
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a> *request</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#InfAdoptedStateVector" title="InfAdoptedStateVector"><span class="type">InfAdoptedStateVector</span></a> *diff_vec</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> operation</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="InfAdoptedSession.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a class="link" href="InfSession.html" title="InfSession">InfSession</a>
         +----InfAdoptedSession
</pre>
</div>
<div class="refsect1" title="Implemented Interfaces">
<a name="InfAdoptedSession.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
InfAdoptedSession implements
 <a class="link" href="InfCommunicationObject.html" title="InfCommunicationObject">InfCommunicationObject</a>.</p>
</div>
<div class="refsect1" title="Properties">
<a name="InfAdoptedSession.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="InfAdoptedSession.html#InfAdoptedSession--algorithm" title='The "algorithm" property'>algorithm</a>"                <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>*  : Read
  "<a class="link" href="InfAdoptedSession.html#InfAdoptedSession--io" title='The "io" property'>io</a>"                       <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="InfAdoptedSession.html#InfAdoptedSession--max-total-log-size" title='The "max-total-log-size" property'>max-total-log-size</a>"       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" title="Description">
<a name="InfAdoptedSession.description"></a><h2>Description</h2>
<p>
<a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> handles concurrency control with an <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>
on top of a <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>. It takes care of sending all necessary information
to joining users, receives requests from the network (passing them to
<a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>) and transfers local requests to the other users. It
also makes sure to periodically send the state the local host is in to
other uses even if the local users are idle (which is required for others
to cleanup their request logs and request caches).
</p>
</div>
<div class="refsect1" title="Details">
<a name="InfAdoptedSession.details"></a><h2>Details</h2>
<div class="refsect2" title="enum InfAdoptedSessionError">
<a name="InfAdoptedSessionError"></a><h3>enum InfAdoptedSessionError</h3>
<pre class="programlisting">typedef enum _InfAdoptedSessionError {
  INF_ADOPTED_SESSION_ERROR_NO_SUCH_USER,
  INF_ADOPTED_SESSION_ERROR_MISSING_OPERATION,
  INF_ADOPTED_SESSION_ERROR_INVALID_REQUEST,

  INF_ADOPTED_SESSION_ERROR_MISSING_STATE_VECTOR,
  
  INF_ADOPTED_SESSION_ERROR_FAILED
} InfAdoptedSessionError;
</pre>
<p>
Error codes for <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>. These only occur when invalid requests
are received from the network.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="INF-ADOPTED-SESSION-ERROR-NO-SUCH-USER:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_SESSION_ERROR_NO_SUCH_USER</code></span></p></td>
<td>The "user" field in a request
message does not contain a valid user ID.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-SESSION-ERROR-MISSING-OPERATION:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_SESSION_ERROR_MISSING_OPERATION</code></span></p></td>
<td>A request message does not
contain an operation.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-SESSION-ERROR-INVALID-REQUEST:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_SESSION_ERROR_INVALID_REQUEST</code></span></p></td>
<td>A request in a synchronized
request log is invalid. Invalid means that it is not the request that
was issued after the previous request in the log, or that it is an Undo
or Redo request without a request to Undo or Redo, respectively.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-SESSION-ERROR-MISSING-STATE-VECTOR:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_SESSION_ERROR_MISSING_STATE_VECTOR</code></span></p></td>
<td>A synchronized user does
not contain that the state that user currently is in.
</td>
</tr>
<tr>
<td><p><a name="INF-ADOPTED-SESSION-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">INF_ADOPTED_SESSION_ERROR_FAILED</code></span></p></td>
<td>No further specified error code.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="InfAdoptedSession">
<a name="InfAdoptedSession-struct"></a><h3>InfAdoptedSession</h3>
<pre class="programlisting">typedef struct _InfAdoptedSession InfAdoptedSession;</pre>
<p>
<a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> is an opaque data type. You should only access it via
the public API functions.
</p>
</div>
<hr>
<div class="refsect2" title="InfAdoptedSessionClass">
<a name="InfAdoptedSessionClass"></a><h3>InfAdoptedSessionClass</h3>
<pre class="programlisting">typedef struct {
  InfAdoptedRequest*(*xml_to_request)(InfAdoptedSession* session,
                                      xmlNodePtr xml,
                                      InfAdoptedStateVector* diff_vec,
                                      gboolean for_sync,
                                      GError** error);

  void(*request_to_xml)(InfAdoptedSession* session,
                        xmlNodePtr xml,
                        InfAdoptedRequest* request,
                        InfAdoptedStateVector* diff_vec,
                        gboolean for_sync);
} InfAdoptedSessionClass;
</pre>
<p>
Virtual functions for <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedSessionClass.xml-to-request"></a>xml_to_request</code></em> ()</span></p></td>
<td>Virtual function to deserialize an <a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a>
from XML. The implementation of this function can use
<a class="link" href="InfAdoptedSession.html#inf-adopted-session-read-request-info" title="inf_adopted_session_read_request_info ()"><code class="function">inf_adopted_session_read_request_info()</code></a> to read the common info.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfAdoptedSessionClass.request-to-xml"></a>request_to_xml</code></em> ()</span></p></td>
<td>Virtual function to serialize an <a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a>
to XML. This function should add properties and children to the given XML
node. At might use <a class="link" href="InfAdoptedSession.html#inf-adopted-session-write-request-info" title="inf_adopted_session_write_request_info ()"><code class="function">inf_adopted_session_write_request_info()</code></a> to write the
common info.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_get_io ()">
<a name="inf-adopted-session-get-io"></a><h3>inf_adopted_session_get_io ()</h3>
<pre class="programlisting"><a class="link" href="InfIo.html" title="InfIo"><span class="returnvalue">InfIo</span></a> *             inf_adopted_session_get_io          (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>);</pre>
<p>
Returns the <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> object of <em class="parameter"><code>session</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_get_algorithm ()">
<a name="inf-adopted-session-get-algorithm"></a><h3>inf_adopted_session_get_algorithm ()</h3>
<pre class="programlisting"><a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="returnvalue">InfAdoptedAlgorithm</span></a> * inf_adopted_session_get_algorithm (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>);</pre>
<p>
Returns the <span class="type">InfAlgorithm</span> object of <em class="parameter"><code>session</code></em>. Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>session</code></em>
has status <a class="link" href="InfSession.html#INF-SESSION-PRESYNC:CAPS"><code class="literal">INF_SESSION_PRESYNC</code></a> or <a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a> because there
the algorithm object is not yet created before successful synchronization.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_broadcast_request ()">
<a name="inf-adopted-session-broadcast-request"></a><h3>inf_adopted_session_broadcast_request ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_adopted_session_broadcast_request
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a> *request</code></em>);</pre>
<p>
Sends a request to all subscribed connections. The request should originate
from a call to <a class="link" href="InfAdoptedAlgorithm.html#inf-adopted-algorithm-generate-request-noexec" title="inf_adopted_algorithm_generate_request_noexec ()"><code class="function">inf_adopted_algorithm_generate_request_noexec()</code></a>,
<a class="link" href="InfAdoptedAlgorithm.html#inf-adopted-algorithm-generate-request" title="inf_adopted_algorithm_generate_request ()"><code class="function">inf_adopted_algorithm_generate_request()</code></a>,
<a class="link" href="InfAdoptedAlgorithm.html#inf-adopted-algorithm-generate-undo" title="inf_adopted_algorithm_generate_undo ()"><code class="function">inf_adopted_algorithm_generate_undo()</code></a> or
<a class="link" href="InfAdoptedAlgorithm.html#inf-adopted-algorithm-generate-redo" title="inf_adopted_algorithm_generate_redo ()"><code class="function">inf_adopted_algorithm_generate_redo()</code></a> with <em class="parameter"><code>session</code></em>'s <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>request</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a> obtained from <em class="parameter"><code>session</code></em>'s algorithm.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_undo ()">
<a name="inf-adopted-session-undo"></a><h3>inf_adopted_session_undo ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_adopted_session_undo            (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
This is a shortcut for creating <em class="parameter"><code>n</code></em> undo requests and broadcasting them.
If <em class="parameter"><code>n</code></em> &gt; 1 then this is also more efficient.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
<td>A local <a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The number of undo requests to issue.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_redo ()">
<a name="inf-adopted-session-redo"></a><h3>inf_adopted_session_redo ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_adopted_session_redo            (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
This is a shortcut for creating <em class="parameter"><code>n</code></em> redo requests and broadcasting them.
If <em class="parameter"><code>n</code></em> &gt; 1 then this is also more efficient.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
<td>A local <a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>The number of redo requests to issue.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_read_request_info ()">
<a name="inf-adopted-session-read-request-info"></a><h3>inf_adopted_session_read_request_info ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            inf_adopted_session_read_request_info
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#InfAdoptedStateVector" title="InfAdoptedStateVector"><span class="type">InfAdoptedStateVector</span></a> *diff_vec</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedUser.html" title="InfAdoptedUser"><span class="type">InfAdoptedUser</span></a> **user</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#InfAdoptedStateVector" title="InfAdoptedStateVector"><span class="type">InfAdoptedStateVector</span></a> **time</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> *operation</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
This function reads common information such as the state vector the request
was made and the user that made the request from XML. It is most likely to
be used by implementations of the xml_to_request virtual function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xml</code></em> :</span></p></td>
<td>The XML to read the data from.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>diff_vec</code></em> :</span></p></td>
<td>The reference vector of the time vector of the request, or
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
<td>Location to store the user of the request, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
<td>Location to store the state the request was made, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>operation</code></em> :</span></p></td>
<td>Location to store the operation of the request, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to place an error, if any.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the data could be read successfully, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the XML
request does not contain valid request data, in which case <em class="parameter"><code>error</code></em> is set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_adopted_session_write_request_info ()">
<a name="inf-adopted-session-write-request-info"></a><h3>inf_adopted_session_write_request_info ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_adopted_session_write_request_info
                                                        (<em class="parameter"><code><a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a> *request</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#InfAdoptedStateVector" title="InfAdoptedStateVector"><span class="type">InfAdoptedStateVector</span></a> *diff_vec</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> operation</code></em>);</pre>
<p>
This function writes common data from <em class="parameter"><code>request</code></em>, such as the user that
issued the request and the state in which the request was made into <em class="parameter"><code>xml</code></em>.
If <em class="parameter"><code>diff_vec</code></em> is given, then the state is written as a diff to this vector,
see <a class="link" href="libinfinity-0.4-InfAdoptedStateVector.html#inf-adopted-state-vector-to-string-diff" title="inf_adopted_state_vector_to_string_diff ()"><code class="function">inf_adopted_state_vector_to_string_diff()</code></a>. Deserializing this data
again (via <a class="link" href="InfAdoptedSession.html#inf-adopted-session-read-request-info" title="inf_adopted_session_read_request_info ()"><code class="function">inf_adopted_session_read_request_info()</code></a>) requires the same
<em class="parameter"><code>diff_vec</code></em> then.
</p>
<p>
This function is most likely to be used by implementations of the
request_to_xml virtual function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession"><span class="type">InfAdoptedSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>request</code></em> :</span></p></td>
<td>The <a class="link" href="InfAdoptedRequest.html" title="InfAdoptedRequest"><span class="type">InfAdoptedRequest</span></a> whose info to write.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>diff_vec</code></em> :</span></p></td>
<td>A reference state vector, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xml</code></em> :</span></p></td>
<td>The XML node to write the data into.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>operation</code></em> :</span></p></td>
<td>An XML node representing the operation of the request, or
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="InfAdoptedSession.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "algorithm" property'>
<a name="InfAdoptedSession--algorithm"></a><h3>The <code class="literal">"algorithm"</code> property</h3>
<pre class="programlisting">  "algorithm"                <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>*  : Read</pre>
<p>The adOPTed algorithm used for translating incoming requests.</p>
</div>
<hr>
<div class="refsect2" title='The "io" property'>
<a name="InfAdoptedSession--io"></a><h3>The <code class="literal">"io"</code> property</h3>
<pre class="programlisting">  "io"                       <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>*                : Read / Write / Construct Only</pre>
<p>The IO object used for timeouts.</p>
</div>
<hr>
<div class="refsect2" title='The "max-total-log-size" property'>
<a name="InfAdoptedSession--max-total-log-size"></a><h3>The <code class="literal">"max-total-log-size"</code> property</h3>
<pre class="programlisting">  "max-total-log-size"       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
<p>The maximum number of requests to keep in all user's logs.</p>
<p>Default value: 2048</p>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="InfAdoptedSession.see-also"></a><h2>See Also</h2>
<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>, <a class="link" href="InfAdoptedAlgorithm.html" title="InfAdoptedAlgorithm"><span class="type">InfAdoptedAlgorithm</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>